﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BuzzwordBingo.Entities
{
    /// <summary>
    /// Serves as a technical id for objects
    /// </summary>
    public class PersistenceBase
    {
        #region public properties

        public int Id { get; set; }

        #endregion

        #region constructors

        /// <summary>
        /// Initialize an id
        /// </summary>
        public PersistenceBase()
        {
            Id = GetNewId();
        }

        #endregion

        #region static methods

        protected static int NewId = 0;
        public static int GetNewId()
        {
            return NewId++;
        }

        #endregion
    }
}
